[% setvar title C<use syntax> %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='TITLE'></a><h1>TITLE</h1>
<p><code>use syntax</code></p>
<a name='VERSION'></a><h1>VERSION</h1>
<pre>  Maintainer: Simon Cozens &lt;<a href='mailto:simon@brecon.co.uk'>simon@brecon.co.uk</a>&gt;
  Date: 28 Sep 2000
  Mailing List: <a href='mailto:perl6-language@perl.org'>perl6-language@perl.org</a>
  Number: 329
  Version: 1
  Status: Developing</pre>
<a name='ABSTRACT'></a><h1>ABSTRACT</h1>
<p>A pragma to modify the syntax of Perl 6 at run time. Oh yes.</p>
<a name='DESCRIPTION'></a><h1>DESCRIPTION</h1>
<p>So, maybe the Perl 6 crack pipe finally got around to me, but it
seems to me that if we've got a parser that we can modify and add hooks
to in Perl space (see RFC 314) then we can alter Perl's syntax using
pragmata.</p>
<p>Combining this with source filters means that we can arrange for the
line</p>
<pre>    use syntax &quot;perl5&quot;;</pre>
<p>to enable legacy Perl programs to run under Perl 6.</p>
<p>I briefly considered</p>
<pre>    {
        use syntax &quot;python&quot;;
    }</pre>
<p>and nearly lost my lunch.</p>
<p>Seriously, though, I think if we have a flexible parser that we can
modify in Perl space, interpreting legacy versions of Perl or inferior
languages could quite definitely become possible.</p>
<a name='IMPLEMENTATION'></a><h1>IMPLEMENTATION</h1>
<p>First, implement 314. Then construct grammars for what we want to parse,
and ensure that the parser is flexible enough to allow them as alternate
grammars.</p>
<a name='REFERENCES'></a><h1>REFERENCES</h1>
<p>RFC 314</p>
</div>
